package com.zzyl.serve.service.impl;

import java.time.LocalDateTime;
import java.util.List;
import com.zzyl.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zzyl.serve.mapper.MemberReservationMapper;
import com.zzyl.serve.domain.MemberReservation;
import com.zzyl.serve.service.IMemberReservationService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.Arrays;
import java.util.Map;

/**
 * 预约信息Service业务层处理
 *
 * @author ruoyi
 * @date 2025-05-09
 */
@Service
public class MemberReservationServiceImpl extends ServiceImpl<MemberReservationMapper, MemberReservation> implements IMemberReservationService
{
    @Autowired
    private MemberReservationMapper memberReservationMapper;

    @Override
    public Integer getCancelledById(Long userId) {
        return memberReservationMapper.getCancelledById(userId).size();
    }

    @Override
    public Map<Long, Integer> selectByTime(Long time) {
        return memberReservationMapper.getCountByTime(time);
    }
}
